home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / Buch / Hallo4.cpp < prev    next >
C/C++ Source or Header  |  1998-12-15  |  1KB  |  30 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "Hallo4.h"
  6. //---------------------------------------------------------------------------
  7. #pragma resource "*.dfm"
  8. TForm1 *Form1;
  9. //---------------------------------------------------------------------------
  10. __fastcall TForm1::TForm1(TComponent* Owner)
  11.     : TForm(Owner)
  12. {
  13. }
  14. //---------------------------------------------------------------------------
  15. void __fastcall TForm1::ListBox1Click(TObject *Sender)
  16. {
  17.   if (ListBox1->ItemIndex == 0)
  18.     Application->MessageBox ("Das ist ja toll!", "", 4+48);
  19.   if (ListBox1->ItemIndex == 1)
  20.     Application->MessageBox ("Das freut mich!", "", 4+48);
  21.   if (ListBox1->ItemIndex == 2)
  22.     Application->MessageBox ("Das geht ja noch!", "", 4+32);
  23.   if (ListBox1->ItemIndex == 3)
  24.     Application->MessageBox ("Das tut mir leid!", "", 4+48);
  25.   if (ListBox1->ItemIndex == 4)
  26.     Application->MessageBox ("Das ist ja schlimm!", "", 4+48);
  27.   if (ListBox1->ItemIndex == 5)
  28.     Application->MessageBox ("Wenn du meinst...", "", 1+16);
  29. }
  30. //---------------------------------------------------------------------------